<template>
    <div>
        <div class="box color333 minHeight">
            <div class="">
                <div class="size18">发布类型</div>
                <div :key="index" @click="onJump(item.url)" class="flexSB marginTop20 cursor-pointer" v-for="(item, index) in releaseList">
                    <div class="flexFS">
                        <img :src="item.img" alt srcset style="width: 40px;" />
                        <div style="margin-left:15px">{{ item.title }}</div>
                    </div>
                    <i class="el-icon-arrow-right"></i>
                </div>
            </div>

        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            releaseList: [
                {
                    img: require('@/assets/mine/short.png'),
                    title: '发布短视频',
                    url: '/release',
                },
                {
                    img: require('@/assets/mine/long.png'),
                    title: '发布长视频',
                    url: '/release/upload-long/index',
                },
                {
                    img: require('@/assets/mine/tiezi2x.png'),
                    title: '发布帖子',
                    url: '/release/upload-post',
                }
            ],
            toolList: [
                {
                    img: require('@/assets/mine/wallet.png'),
                    title: '我的钱包',
                    url: '/mine/wallet',
                },
                {
                    img: require('@/assets/mine/goods.png'),
                    title: '我的订单',
                    url: '/mine/order',
                },
                {
                    img: require('@/assets/mine/gift.png'),
                    title: '我的礼物',
                    url: '/mine/gift',
                },
            ],
        }
    },
    computed: {
        user_info() {
            return this.$store.state.user.user
        },
    },
    methods: {
        onJump(url) {
            this.$router.push(url)
        },
        signOut() {
            this.$confirm('确定要退出登录吗？', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
            })
                .then(() => {
                    this.$store.dispatch('user/signOut')
                    this.$router.push({ path: '/' })
                })
                .catch(() => {
                    
                })
        },
        copy(text) {
            const inputElement = document.createElement('input')
            inputElement.value = text
            document.body.appendChild(inputElement)
            inputElement.select()
            document.execCommand('copy')
            document.body.removeChild(inputElement)
            this.$message.success('复制成功')
        },
    },
}
</script>

<style lang="scss" scoped>
.copy {
    font-size: 22px !important;
}
</style>